home *** CD-ROM | disk | FTP | other *** search
- PXFWAIT(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFWWAAIITT, PPXXFFWWAAIITTPPIIDD - Obtains information about a calling process'
- child process
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFWWAAIITT ((_i_s_t_a_t,, _i_r_e_t_p_i_d,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_s_t_a_t,, _i_r_e_t_p_i_d,, _i_e_r_r_o_r
-
- SSUUBBRROOUUTTIINNEE PPXXFFWWAAIITTPPIIDD ((_i_p_i_d,, _i_s_t_a_t,, _i_o_p_t_i_o_n_s,, _i_r_e_t_p_i_d,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_p_i_d,, _i_s_t_a_t,, _i_o_p_t_i_o_n_s,, _i_r_e_t_p_i_d,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFWWAAIITT routine uses the wwaaiitt(2) system call to obtain information
- about one of the calling process's child processes.
-
- The PPXXFFWWAAIITTPPIIDD routine uses the wwaaiittppiidd(2) system call to obtain
- information about one of the calling process's child processes.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of arguments for this routine:
-
- _i_p_i_d An input integer variable containing the child process ID
- for which information is requested.
-
- * If _i_p_i_d is equal to -1, status is requested for any child
- process; PPXXFFWWAAIITTPPIIDD is then equivalent to PPXXFFWWAAIITT.
-
- * If _i_p_i_d is greater than 0, it specifies the process ID of
- a single child process for which status is requested.
-
- * If _i_p_i_d is equal to 0, status is requested for any child
- process with a process group ID that is equal to that of
- the calling process.
-
- * If _i_p_i_d is less than -1, status is requested for any child
- process with a process group ID that is equal to the
- absolute value of _i_p_i_d.
-
- _i_s_t_a_t An output integer variable for the status information.
-
- _i_o_p_t_i_o_n_s An input integer variable constructed from an inclusive OORR
- of zero or more of the following options:
-
- WWNNOOHHAANNGG The wwaaiittppiidd system call does not suspend
- execution of the calling process if status is
- not immediately available for one of the calling
- processes specified by pid.
-
- WWUUNNTTRRAACCEEDD If job control is supported, the status of any
- child processes specified by pid that are
- stopped, and with a status that has not yet been
- reported since they stopped, are also reported
- to the requesting process.
-
- UNICOS and UNICOS/mk systems only:
-
- WWMMTTWWAAIITT Waits for the children of any member of the
- multitasking group. In UNICOS 9.0 this is the
- default behavior for both wwaaiitt and wwaaiittppiidd. The
- flag is still provided for source compatibility.
- To get the previous behavior, see the
- description of the WWLLWWPPWWAAIITT flag.
-
- WWLLWWPPWWAAIITT Waits only for the immediate children of the
- calling light-weight process (LWP). This flag
- is not recommended for general use.
-
- _i_r_e_t_p_i_d An output integer variable for the child process ID.
-
- _i_e_r_r_o_r An output integer variable that contains zero if the routine
- was successful or nonzero if the routine was not successful.
-
- Any of the following error values may be returned:
-
- EECCHHIILLDD PPXXFFWWAAIITT: If the calling process has no existing unwaited-for
- child processes.
- PPXXFFWWAAIITTPPIIDD: The process or process group specified by _i_p_i_d
- does not exist or is not a child of the calling process.
-
- EEIINNTTRR If receipt of a signal other than the death-of-a-child-
- process signal.
-
- EEIINNVVAALL The value of the _i_o_p_t_i_o_n_s argument is not valid.
-
- EEXXAAMMPPLLEESS
- PPXXFFWWAAIITT eexxaammppllee::
- program pxftest
- integer istat, iretpid, ipid, ierror, i, j
-
- CALL PXFFORK(ipid,ierror)
- if (ierror .ne. 0) then
- print *,'FAILED: PXFFORK call failed with error = ',ierror
- else
- if (ipid .eq. 0) then
- j = 0
- do i=1,100000
- j = j + i
- enddo
- stop
- else
- CALL PXFWAIT(istat,iretpid,ierror)
- if (ierror .eq. 0) then
- print *,'PASSED: PXFWAIT normal test'
- else
- print *,'FAILED: PXFWAIT call with error = ',ierror
- endif
- endif
- endif
- end
-
- PPXXFFWWAAIITTPPIIDD eexxaammppllee::
- program pxftest
- integer istat, iretpid, ipid, ierror, i, j, ioptions
-
- CALL PXFFORK(ipid,ierror)
- if (ierror .ne. 0) then
- print *,'FAILED: PXFFORK call failed with error = ',ierror
- else
- if (ipid .eq. 0) then
- j = 0
- do i=1,100000
- j = j + i
- enddo
- stop
- else
- ioptions = 0
- CALL PXFWAITPID(ipid,istat,ioptions,iretpid,ierror)
- if (ierror .eq. 0) then
- print *,'PASSED: PXFWAITPID normal test'
- else
- print *,'FAILED: PXFWAITPID call with error = ',ierror
- endif
- endif
- endif
- end
-
- SSEEEE AALLSSOO
- wwaaiitt(2), wwaaiittppiidd(2)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-